package cn.xiuxius.embedded.toolwindow.model;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;

@Getter
@Setter
@Accessors(chain = true)
public class Selectable {

    public static final Selectable CUSTOM = new Selectable("CUSTOM");

    public enum Type {
        PRESET,
        CUSTOM
    }

    private final String value;
    private Type type = Type.PRESET;

    public static List<Selectable> from(List<String> values) {
        return values.stream().map(Selectable::new).toList();
    }

    public Selectable(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return value;
    }
}
